import { FormSchema } from '@/components/Table';

export function detailSchemas(): FormSchema[] {
  return [
    {
      field: 'username',
      component: 'Input',
      label: '用户名',
      colProps: {
        span: 24,
      },
      componentProps: {
        disabled: false,
      },
      required: true,
    },
    {
      field: 'role',
      component: 'Select',
      label: '角色',
      colProps: {
        span: 24,
      },
      componentProps: {
        options: [
          { label: '管理员', value: '管理员', key: '管理员' },
          { label: '普通用户', value: '普通用户', key: '普通用户' },
        ],
        // disabled: true,
      },
      required: true,
    },
    {
      field: 'realname',
      component: 'Input',
      label: '姓名',
      colProps: {
        span: 24,
      },
      componentProps: {
        disabled: false,
      },
      required: true,
    },
    {
      field: 'password',
      component: 'Input',
      label: '密码',
      colProps: {
        span: 24,
      },
      componentProps: {
        disabled: false,
      },
      required: true,
    },
    {
      field: 'state',
      component: 'Select',
      label: '状态',
      colProps: {
        span: 24,
      },
      componentProps: {
        options: [
          { label: '启用', value: 1, key: 1 },
          { label: '禁用', value: 0, key: 0 },
        ],
        disabled: false,
      },
      required: true,
    },
  ];
}
